import React from 'react';
import ReactDOM from 'react-dom';
import {
  BrowserRouter as Router,
  Route,
  Switch,
} from 'react-router-dom';
import './index.css';
import Home from './views/Home';
import Clumn from './views/clumn/clumn';
import Clumn2 from './views/clumn/clumn2';
import Tab from './views/tab/tab';
import Shop from './views/shop/shop';
import Food from './views/type/food';
import Film from './views/type/film';
import Hotel from './views/type/hotel';
import Entertainment from './views/type/entertainment';
import TakeOutFood from './views/type/take-out-food';
import KTV from './views/type/ktv';
import Sightseeing from './views/type/sightseeing';
import Beauty from './views/type/beauty';
import Snack from './views/type/snack';
import Ticket from './views/type/ticket';
import Massage from './views/type/massage';
import NewSingle from './views/type/new-single';

class ModalSwitch extends React.Component {
  render() {
    return (
      <div style={{height:'100%'}}>
        <Switch>
          <Route exact path='/' component={Home}/>
          <Route path='/clumn' component={Clumn}/>
          <Route path='/clumn2' component={Clumn2}/>
          <Route path='/tab' component={Tab}/>
          <Route path='/shop' component={Shop}/>
          <Route path='/food' component={Food}/>
          <Route path='/film' component={Film}/>
          <Route path='/hotel' component={Hotel}/>
          <Route path='/entertainment' component={Entertainment}/>
          <Route path='/take-out-food' component={TakeOutFood}/>
          <Route path='/ktv' component={KTV}/>
          <Route path='/sightseeing' component={Sightseeing}/>
          <Route path='/beauty' component={Beauty}/>
          <Route path='/snack' component={Snack}/>
          <Route path='/ticket' component={Ticket}/>
          <Route path='/massage' component={Massage}/>
          <Route path='/new-single' component={NewSingle}/>
        </Switch>
      </div>
    )
  }
}

const BasicExample = () => (
  <Router>
    <ModalSwitch />
  </Router>
)
ReactDOM.render(<BasicExample />,document.getElementById('root'));